﻿@using Resources
@using QAS.Nekorama.Models
@model User
@{
    ViewBag.Title = QAS_Nekorama.EDIT;
}

@using (Html.BeginForm("EditUserInfo", "User", FormMethod.Post))
{
    <link href="~/Content/style.css" rel="stylesheet" />
    <script src="~/Scripts/jquery-ui-1.8.20.js"> </script>
    <script>
        $(document).ready(function() {
            // Handler for .ready() called.
            $("#datepicker").datepicker({
                changeMonth: true,
                changeYear: true
            });
            $("#datepicker").datepicker("option", "dateFormat", "yy-mm-dd");
            $("#datepicker").datepicker("option", "maxDate", '+0m +0w');
            $("#datepicker").datepicker("setDate", $("#hide_date").val());
            $("#datepicker").datepicker("option", "yearRange", "-100:+0");
        });
    </script>
    <script>
        function showMess(event) {
            event.preventDefault();
            $('#edit-u-form').submit();
            debugger;
            return false;
        }
    </script>

    <div id="primary">
        <div id="primary-1">
        </div>
        <!--end primary-1-->
        <form id="edit-u-form" method="post" action="EditUserInfo">
            <div id="primary-2">
                <div class="profile-edit">
                    <input type="hidden" name ="uid" value="@Model.UserID">

                    <!--DISPLAY NAME-->
                    <h2>@QAS_Nekorama.DISPLAY_NAME: @Model.DisplayName </h2>

                    <!--AVATAR-->
                    <h2>@QAS_Nekorama.AVATAR</h2>
                    <img src="/Images/Avatars/@Model.Avatar" style="border: 1px solid #cccccc; margin-left: 20px; width: 100px;" />

                    <!--BIRTHDAY-->
                    <h2>@QAS_Nekorama.BIRTHDAY</h2>
                    <input class="u-input-field" type="text" name="datepicker" id="datepicker" readonly="true" />
                    <input type="hidden" id="hide_date" value="@ViewData["birthday"]">

                    <h2>@QAS_Nekorama.LOCATION</h2>
                    <input class="u-input-field" type="text" name="location" value="@ViewData["location"]" id="location" />

                    <!--ABOUT ME-->
                    <h2>@QAS_Nekorama.ABOUT_ME</h2>
                    <textarea name="aboutme">@ViewData["aboutMe"]</textarea>
                </div>
                <!--end profile-edit-->
            </div>
            <!--end primary-2-->

            <div id="primary-3">
                <div class="tools">
                    <button id="save-u-btn" type="submit">@QAS_Nekorama.SAVE</button>
                </div>
                <!--end tools-->
            </div>
            <!--end primary-3-->
        </form>
        <!--end edit-u-form-->
    </div>
    <!--end primary-->
}